package com.beans.userrepository;

import com.model.User;
import org.springframework.stereotype.Repository;

@Repository //将对象注入到spring中
public class UserRepository2 {
    public User getUser(){
        //伪代码
        User user=new User();
        user.setId(1);
        user.setName("宛如");
        user.setPassword("678");
        return user;
    }
}
